﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_DoiTuongThue : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("CmdTimDoiTuong")]
        private Button _CmdTimDoiTuong;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("TxtDiaChiThue")]
        private TextBox _TxtDiaChiThue;
        [AccessedThroughProperty("TxtMaSoThue")]
        private TextBox _TxtMaSoThue;
        [AccessedThroughProperty("TxtTenDoiTuongThue")]
        private TextBox _TxtTenDoiTuongThue;
        private IContainer components;
        private string mAction;
        private string mDiaChi;
        private string mKhoaDoiTuong;
        private string mMaSoThue;
        private string mTenDoiTuong;
        private string mValueReturn;

        public Frm_DoiTuongThue()
        {
            base.Load += new EventHandler(this.Frm_DoiTuongThue_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.mAction = "";
            this.InitializeComponent();
        }

        private void CmdCancel_Click(object sender, EventArgs e)
        {
            this.mAction = "";
            this.mValueReturn = "";
            this.Close();
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            this.mValueReturn = LVYModule.ReturnIfNull(this.TxtTenDoiTuongThue.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() + "|" + LVYModule.ReturnIfNull(this.TxtMaSoThue.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() + "|" + LVYModule.ReturnIfNull(this.TxtDiaChiThue.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
            this.Close();
        }

        private void CmdTimDoiTuong_Click(object sender, EventArgs e)
        {
            string expression = SearchModule.SearchDoiTuong("", "", "");
            if (expression != "")
            {
                object instance = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                clsDMDoiTuong tuong = new clsDMDoiTuong();
                tuong.Load(Conversions.ToString(NewLateBinding.LateIndexGet(instance, new object[] { 0 }, null)));
                if (modGeneral.H_LANGUAGE.Trim().ToUpper() == "VIET")
                {
                    this.TxtTenDoiTuongThue.Text = tuong.TenViet;
                }
                else
                {
                    this.TxtTenDoiTuongThue.Text = tuong.TenViet;
                }
                this.TxtMaSoThue.Text = tuong.MaSoThue;
                this.TxtDiaChiThue.Text = tuong.DiaChi;
            }
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_DoiTuongThue_Load(object sender, EventArgs e)
        {
            if (this.mAction == "VIEW")
            {
                this.CmdOK.Enabled = false;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_DoiTuongThue));
            this.GroupBox1 = new GroupBox();
            this.Label3 = new Label();
            this.TxtDiaChiThue = new TextBox();
            this.Label2 = new Label();
            this.TxtMaSoThue = new TextBox();
            this.CmdTimDoiTuong = new Button();
            this.Label1 = new Label();
            this.TxtTenDoiTuongThue = new TextBox();
            this.CmdCancel = new Button();
            this.CmdOK = new Button();
            this.GroupBox1.SuspendLayout();
            this.SuspendLayout();
            this.GroupBox1.Controls.Add(this.Label3);
            this.GroupBox1.Controls.Add(this.TxtDiaChiThue);
            this.GroupBox1.Controls.Add(this.Label2);
            this.GroupBox1.Controls.Add(this.TxtMaSoThue);
            this.GroupBox1.Controls.Add(this.CmdTimDoiTuong);
            this.GroupBox1.Controls.Add(this.Label1);
            this.GroupBox1.Controls.Add(this.TxtTenDoiTuongThue);
            Point point = new Point(6, 6);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            Size size = new Size(0x21f, 0x95);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 0;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "Đối tượng thuế";
            this.Label3.AutoSize = true;
            point = new Point(6, 0x63);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(40, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 6;
            this.Label3.Text = "Địa chỉ";
            point = new Point(0x74, 0x60);
            this.TxtDiaChiThue.Location = point;
            this.TxtDiaChiThue.Name = "TxtDiaChiThue";
            size = new Size(0x1a6, 20);
            this.TxtDiaChiThue.Size = size;
            this.TxtDiaChiThue.TabIndex = 5;
            this.Label2.AutoSize = true;
            point = new Point(6, 0x44);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(60, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 4;
            this.Label2.Text = "M\x00e3 số thuế";
            point = new Point(0x74, 0x41);
            this.TxtMaSoThue.Location = point;
            this.TxtMaSoThue.Name = "TxtMaSoThue";
            size = new Size(0x88, 20);
            this.TxtMaSoThue.Size = size;
            this.TxtMaSoThue.TabIndex = 3;
            this.CmdTimDoiTuong.FlatStyle = FlatStyle.System;
            point = new Point(0x204, 0x20);
            this.CmdTimDoiTuong.Location = point;
            this.CmdTimDoiTuong.Name = "CmdTimDoiTuong";
            size = new Size(0x16, 0x16);
            this.CmdTimDoiTuong.Size = size;
            this.CmdTimDoiTuong.TabIndex = 2;
            this.CmdTimDoiTuong.Text = "...";
            this.CmdTimDoiTuong.UseVisualStyleBackColor = true;
            this.Label1.AutoSize = true;
            point = new Point(6, 0x24);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x62, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 1;
            this.Label1.Text = "T\x00ean đối tượng thuế";
            point = new Point(0x74, 0x21);
            this.TxtTenDoiTuongThue.Location = point;
            this.TxtTenDoiTuongThue.Name = "TxtTenDoiTuongThue";
            size = new Size(0x18f, 20);
            this.TxtTenDoiTuongThue.Size = size;
            this.TxtTenDoiTuongThue.TabIndex = 0;
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x1d1, 0xa1);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            size = new Size(0x4f, 0x18);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 6;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x17e, 0xa1);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x4e, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 5;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x228, 0xc0);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.CmdCancel);
            this.Controls.Add(this.CmdOK);
            this.Controls.Add(this.GroupBox1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.Name = "Frm_DoiTuongThue";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "THONG TIN DOI TUONG THUE";
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            this.ResumeLayout(false);
        }

        public string Action
        {
            get
            {
                return this.mAction;
            }
            set
            {
                this.mAction = value;
            }
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCancel_Click);
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click -= handler;
                }
                this._CmdCancel = value;
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click += handler;
                }
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual Button CmdTimDoiTuong
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdTimDoiTuong;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdTimDoiTuong_Click);
                if (this._CmdTimDoiTuong != null)
                {
                    this._CmdTimDoiTuong.Click -= handler;
                }
                this._CmdTimDoiTuong = value;
                if (this._CmdTimDoiTuong != null)
                {
                    this._CmdTimDoiTuong.Click += handler;
                }
            }
        }

        public object DiaChi
        {
            get
            {
                return this.mDiaChi;
            }
            set
            {
                this.mDiaChi = Conversions.ToString(value);
                this.TxtDiaChiThue.Text = Conversions.ToString(value);
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        public string MaSoThue
        {
            get
            {
                return this.mMaSoThue;
            }
            set
            {
                this.mMaSoThue = value;
                this.TxtMaSoThue.Text = value;
            }
        }

        public string TenDoiTuong
        {
            get
            {
                return this.mTenDoiTuong;
            }
            set
            {
                this.mTenDoiTuong = value;
                this.TxtTenDoiTuongThue.Text = value;
            }
        }

        internal virtual TextBox TxtDiaChiThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDiaChiThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDiaChiThue = value;
            }
        }

        internal virtual TextBox TxtMaSoThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMaSoThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtMaSoThue = value;
            }
        }

        internal virtual TextBox TxtTenDoiTuongThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTenDoiTuongThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTenDoiTuongThue = value;
            }
        }

        public string ValueReturn
        {
            get
            {
                return this.mValueReturn;
            }
            set
            {
                this.mValueReturn = value;
            }
        }
    }
}

